﻿@model MileageStats.Web.Models.ReminderFormModel
@Html.AntiForgeryToken()
@{
    var today = DateTime.Now;
}
<ul>
    <li>
        @Html.LabelFor(model => model.Title)
        @Html.ValidationMessageFor(model => model.Title)
        @Mustache.TextBoxFor(model => model.Title, new { id = "ReminderTitle", maxlength = "50" })
    </li>
    <li>
        @Html.LabelFor(model => model.Remarks)
        @Html.ValidationMessageFor(model => model.Remarks)
        @Mustache.TextAreaFor(model => model.Remarks, new { wrap = "soft" })
    </li>
    <li class="psuedo-date">
        <label for="DueDate">Date</label>
        @Html.ValidationMessageFor(model=>model.DueDate)
        @Html.DropDownListFor(model => model.DueDateMonth, SelectListFor.Month(i => today.Month == i))
        @Html.DropDownListFor(model => model.DueDateDay, SelectListFor.Date(i => today.Day == i))
        @Html.DropDownListFor(model => model.DueDateYear, SelectListFor.Year(i => today.Year == i))
    </li>
    <li>
        @Html.LabelFor(model => model.DueDistance)
        @Html.ValidationMessageFor(model => model.DueDistance)
        @Mustache.InputTypeFor(model => model.DueDistance)
    </li>
</ul>

@Html.ValidationSummary(true)

<ol class="hbox button-group">
	<li><button type="submit"><span>Save</span></button></li>
	<li class="icon false invert"><a href="@Url.UnencodedAction("List", "Reminder", new { vehicleId = Mustache.Value(m=>m.VehicleId)})"><span>Cancel</span></a></li>
</ol>

